package com.gopay.common.constants.bank;

public enum YsPayOrderStatus {

	QUERY_YSPAY_STATE_SUCC("00","交易成功"),
	QUERY_YSPAY_STATE_FAIL("99","交易失败"),
	QUERY_YSPAY_STATE_DEAL("50","处理中");
    
	private String key;
    public String value;

    YsPayOrderStatus(String key, String value) {
        this.key = key;
        this.value = value;
    }

    // 普通方法
    public static String getName(String key) {
        for (YsPayOrderStatus info : YsPayOrderStatus.values()) {
            if (info.getKey().equals(key)) {
                return info.value;
            }
        }
        return "";
    }

    @Override
    public String toString() {
        return this.value;
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

    /**
     * @return the value
     */
    public String getValue() {
        return value;
    }

    /**
     * @param value the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }
}
